package com.newtouch.bxzs.business.message.threadtask;

import com.newtouch.bxzs.business.message.service.AdvertisementService;

import java.util.concurrent.Callable;

/**
 * 首页广告列表task
 *
 * <p>
 * <b>History:</b>
 * <table border="1">
 * <tr>
 * <th>Date</th>
 * <th>Operator</th>
 * <th>Memo</th>
 * </tr>
 * <tr>
 * <td>2021/1/21 16:13</td>
 * <td>tianshangzhu</td>
 * <td>Create</td>
 * </tr>
 * </table>
 *
 * @author tianshangzhu
 * @version 1.0.0
 * @since 1.0.0
 */

public class AdvertisementTask implements Callable<Object> {
    private final AdvertisementService advertisementService;

    public AdvertisementTask(AdvertisementService advertisementService) {
        this.advertisementService = advertisementService;
    }


    /**
     * 查询首页广告
     * @return Object
     */
    @Override
    public Object call() {
        // 执行查询
        return advertisementService.getAdvertisementListOnApp();
    }
}
